import { Post } from "@/library/utils/request"
import * as types from "@/views/order_manager/report_record/types"
import { ResponseWithCount } from "@/library/common/types"

export const ReportRecordApiUrl = {
    SelectDaily: "/OrderStat/SelectDaily",
    SelectMonthly: "/OrderStat/SelectMonthly",
    SelectTotal: "/OrderStat/SelectTotal",
}

export const ReportRecordApi = {
    /**
     * 查询日报表
     */
    SelectDaily(params: types.SelectDailyParams) {
        return Post<ResponseWithCount<types.SelectTotalDataType[]>>(ReportRecordApiUrl.SelectDaily, params)
    },
    /**
     * 查询月报表
     */
    SelectMonthly(params: types.SelectMonthlyParams) {
        return Post<ResponseWithCount<types.SelectDailyDataType[]>>(ReportRecordApiUrl.SelectMonthly, params)
    },
    /**
     * 查询总报表
     */
    SelectTotal(params: types.SelectTotalParams) {
        return Post<ResponseWithCount<types.SelectMonthlyDataType[]>>(ReportRecordApiUrl.SelectTotal, params)
    },
}